home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
010a
/
lamenu10.zip
/
LMSETUP.BC
< prev
next >
Wrap
Text File
|
1991-01-20
|
14KB
|
747 lines
:start
cls
let %!y = 0
locate 5 28
echonolf Color Display (Y,N) ???\\0
getkey
if errlevel 89 echo \\27[46;34m
if errlevel 121 echo \\27[46;34m
cls
let %!y = 0
gosub display
goto begin
:display
cls
locate 1 23
echo LaMenu System v1.0 - Setup Utility
return
:m_display
cls
locate 1 18
echo LaMenu System v1.0 - Creating %!a
return
:begin
locate 4 32
echo Select Menu Type
locate 7 27
echo 1 - 12 Selection Main Menu
locate 8 27
echo 2 - 4 Selection Sub Menu
locate 9 27
echo 3 - 6 Selection Sub Menu
locate 10 27
echo 4 - 8 Selection Sub Menu
locate 11 27
echo 5 - 12 Selection Sub Menu
locate 13 33
echo [ESC] To Cancel
:input
locate 15 40
getkey
if errlevel 27 goto end
if errlevel 49 goto main_menu
if errlevel 50 let %!m = 4
if errlevel 51 let %!m = 6
if errlevel 52 let %!m = 8
if errlevel 53 let %!m = 12
cls
gosub display
locate 3 2
echo Enter the DOS filename for this menu ══════════\\16
locate 4 2
echo (do not include an extension)
:fbk
locate 3 50
read %!f
upper %!f
if #%!f = # goto fbk
let %!x = %!f
find_string %!x .
do_if not %!x = 0
locate 3 50
echo \\27[K
goto fbk
end_if
locate 6 2
echo Enter the Menu Name for display ═══════════════\\16
:nbk
locate 6 50
read %!a
if .%!a = . goto nbk
locate 8 2
echo Enter the drive letter for the menu ═══════════\\16
locate 9 2
echo (include the colon - EXAMPLE - C:)
:dbk
locate 8 50
read %!b
upper %!b
let %!x = %!b
find_string %!x :
do_if %!x = 0
locate 8 50
echo \\27[k
goto dbk
end_if
locate 11 2
echo Enter the directory the menu will be kept in ══\\16
locate 12 2
echo (Include the backslash - EXAMPLE - \MENU)
:drbk
locate 11 50
read %!c
upper %!c
let %!x = %!c
find_string %!x \
do_if %!x = 0
locate 11 50
echo \\27[k
goto drbk
end_if
locate 15 2
echo Creating %!m Selection Sub Menu %!b%!c\%!f.BAT
locate 16 2
echo Titled - m%!a
:re
locate 18 27
echonolf Is This Correct (Y,N) ??\\0
read %!i
upper %!i
if %!i = N goto start
if %!i = Y goto cont
if not %!i = Y goto re
:cont
if exist %!f.bat gosub overwrite
if exist %!f.ctl gosub overwrite
if exist %!f.dsp gosub overwrite
gosub display
locate 4 2
echo Enter the DOS filename for the menu this sub menu ═\\16
locate 5 2
echo will be linked to (do not include an extension - EXAMPLE - MAIN)
:fnbk
locate 4 54
read %!d
upper %!d
let %!x = %!d
find_string %!x .
do_if not %!x = 0
locate 4 54
echo \\27[k
goto fnbk
end_if
locate 7 2
echo Enter the drive of the linked menu
locate 8 2
echo (Include the colon:) ═════════════════════════════\\16
:dlbk
locate 8 54
read %!w
upper %!w
let %!x = %!w
find_string %!x :
do_if %!x = 0
locate 8 54
echo \\27[k
goto dlbk
end_if
locate 10 2
echo Enter the directory of the linked menu
locate 11 2
echo (Include the backslash \) ════════════════════════\\16
:drlbk
locate 11 54
read %!e
upper %!e
let %!x = %!e
find_string %!x \
do_if %!x = 0
locate 11 54
echo \\27[k
goto drlbk
end_if
gosub display
locate 4 2
echo Creating %!m Selection Sub Menu %!b%!c\%!f.BAT
locate 5 2
echo Titled - %!a
let %!n = %!m
add %!n 1
let %!h = 1
echo %!a >%!f.dsp
echo ECHO OFF >%!f.bat
echo SET SC=\\37RC\\37>>%!f.bat
echo SET RC=>>%!f.bat
echo :BEGIN>>%!f.bat
echo LAMENU%!m %!f>>%!f.bat
do_while not %!h = %!n
echo IF \\37LM\\37 == %!h GOTO %!h>>%!f.bat
add %!h 1
end_while
echo IF \\37LM\\37 == EX GOTO END>>%!f.bat
let %!h = 1
do_while not %!h = %!n
echo :%!h>>%!f.bat
gosub m_display
locate 4 2
echo Enter The Display Name For Selection %!h═══════\\16
locate 5 2
echo Press Enter To End Setup - Enter * To Skip Selection
locate 4 50
read %!l
if .%!l = . goto end_select
if %!l = * goto skip_select
locate 7 2
echo Enter The DOS Executable Filename ═════════════\\16
:defn
locate 7 50
read %!k
upper %!k
do_if #%!k = #
locate 7 50
echo \\27[k
goto defn
end_if
locate 9 2
echo Enter The Drive Letter (include the colon :) ══\\16
:fdlbk
locate 9 50
read %!j
upper %!j
let %!x = %!j
find_string %!x :
do_if %!x = 0
locate 9 50
echo \\27[k
goto fdlbk
end_if
locate 11 2
echo Enter The Directory (include backslashes \) ═══\\16
:fdrbk
locate 11 50
read %!i
upper %!i
let %!x = %!i
find_string %!x \
do_if %!x = 0
locate 11 50
echo \\27[k
goto fdrbk
end_if
let %!g = 0
locate 13 2
echo 1. Return to this menu
locate 14 2
echo 2. Return to previous linked menu
locate 15 2
echo 3. Exit menus completely
locate 16 12
echonolf Select which ending (1,2,3) ??\\0
getkey
if errlevel 49 let %!g = 1
if errlevel 50 let %!g = 2
if errlevel 51 let %!g = 3
if %!g = 3 goto next
locate 18 2
echonolf Do You Wish A Pause Before Returning To The Menu (Y,N) ?\\0
read %!p
upper %!p
if %!p = Y add %!g 3
:next
echo %!l>>%!f.dsp
gosub pass
do_if %!g = 3
echo SET RC=>>%!f.bat
echo SET LM=>>%!f.bat
echo SET SC=>>%!f.bat
end_if
if not %!b == %!j echo %!j>>%!f.bat
if not %!c == %!i echo CD %!i>>%!f.bat
echo %!k>>%!f.bat
do_if %!g = 3
echo CLS>>%!f.bat
echo GOTO EXIT>>%!f.bat
goto next_1
end_if
if %!g = 4 echo PAUSE \\62NULL>>%!f.bat
if %!g = 5 echo PAUSE \\62NULL>>%!f.bat
if not %!b == %!j echo %!b>>%!f.bat
if not %!c == %!i echo CD %!c>>%!f.bat
if %!g = 1 echo GOTO BEGIN>>%!f.bat
if %!g = 4 echo GOTO BEGIN>>%!f.bat
if %!g = 2 echo GOTO END>>%!f.bat
if %!g = 5 echo GOTO END>>%!f.bat
:next_1
add %!h 1
end_while
goto end_sub
:skip_select
echo * >>%!f.dsp
echo GOTO BEGIN >>%!f.bat
goto next_1
:end_select
echo GOTO BEGIN>>%!f.bat
echo \\42>>%!f.dsp
add %!h 1
do_while not %!h = %!n
echo :%!h>>%!f.bat
echo GOTO BEGIN>>%!f.bat
echo \\42>>%!f.dsp
add %!h 1
end_while
:end_sub
echo \\26>>%!f.dsp
echo :END>>%!f.bat
echo SET RC=\\37SC\\37>>%!f.bat
if not %!b == %!w echo %!w>>%!f.bat
if not %!c == %!e echo CD %!w>>%!f.bat
echo %!d>>%!f.bat
echo :EXIT>>%!f.bat
cls
exit
:pass
locate 20 10
echo Type The Password For This Selection - Press Enter For None
locate 21 35
echo \\218\\196\\196\\196\\196\\196\\196\\196\\196\\191
locate 22 35
echonolf \\179
locate 22 44
echo \\179
locate 23 35
echo \\192\\196\\196\\196\\196\\196\\196\\196\\196\\217
locate 24 15
echo Press Enter When Done (password is case sensitive)
:L1
locate 22 36
getkey
error_level %!o
if not %!o = 13 echonolf \\42
if %!o = 13 return
:L2
locate 22 37
getkey
error_level %!p
if %!p = 13 goto check1
if %!p = 8 goto L2a
echonolf \\42
goto L3
:L2a
locate 22 36
echonolf \\0
goto L1
:L3
locate 22 38
getkey
error_level %!q
if %!q = 13 goto check2
if %!q = 8 goto L3a
echonolf \\42
goto L4
:L3a
locate 22 37
echonolf \\0
goto L2
:L4
locate 22 39
getkey
error_level %!r
if %!r = 13 goto check3
if %!r = 8 goto L4a
echonolf \\42
goto L5
:L4a
locate 22 38
echonolf \\0
goto L3
:L5
locate 22 40
getkey
error_level %!s
if %!s = 13 goto check4
if %!s = 8 goto L5a
echonolf \\42
goto L6
:L5a
locate 22 39
echonolf \\0
goto L4
:L6
locate 22 41
getkey
error_level %!t
if %!t = 13 goto check5
if %!t = 8 goto L6a
echonolf \\42
goto L7
:L6a
locate 22 40
echonolf \\0
goto L5
:L7
locate 22 42
getkey
error_level %!u
if %!u = 13 goto check6
if %!u = 8 goto L7a
echonolf \\42
goto L8
:L7a
locate 22 41
echonolf \\0
goto L6
:L8
locate 22 43
getkey
error_level %!v
if %!v = 13 goto check7
if %!v = 8 goto L8a
echonolf \\42
goto check8
:L8a
locate 22 42
echonolf \\0
goto L7
:check1
let %!x = %!o
goto pass_back
:check2
let %!x = %!o%!p
goto pass_back
:check3
let %!x = %!o%!p%!q
goto pass_back
:check4
let %!x = %!o%!p%!q%!r
goto pass_back
:check5
let %!x = %!o%!p%!q%!r%!s
goto pass_back
:check6
let %!x = %!o%!p%!q%!r%!s%!t
goto pass_back
:check7
let %!x = %!o%!p%!q%!r%!s%!t%!u
goto pass_back
:check8
getkey
error_level %!z
if %!z = 13 goto go8
if %!z = 8 goto re8
beep
goto check8
:re8
locate 15 43
echonolf \\0
goto L8
:go8
let %!x = %!o%!p%!q%!r%!s%!t%!u%!v
:pass_back
add %!y 1
echo %!x>>%!f.ctl
echo LMCNTL %!f %!y>>%!f.bat
echo IF \\37LM\\37 == 86 GOTO BEGIN>>%!f.bat
return
:main_menu
cls
let %!m = 12
gosub display
locate 3 2
echo Enter the DOS filename for this menu ══════════\\16
locate 4 2
echo m(do not include an extension)
:mfbk
locate 3 50
read %!f
upper %!f
let %!x = %!f
find_string %!x .
do_if not %!x = 0
locate 3 50
echo \\27[k
goto mfbk
end_if
locate 6 2
echo Enter the Menu Name for display ═══════════════\\16
:mnbk
locate 6 50
read %!a
do_if .%!a = .
locate 6 50
echo \\27[k
goto mnbk
end_if
locate 8 2
echo Enter the drive letter for the menu ═══════════\\16
locate 9 2
echo (include the colon - EXAMPLE - C:)
:mdbk
locate 8 50
read %!b
upper %!b
let %!x = %!b
find_string %!x :
do_if %!x = 0
locate 8 50
echo \\27[k
goto mdbk
end_if
locate 11 2
echo Enter the directory the menu will be kept in ══\\16
locate 12 2
echo (Include the backslash - EXAMPLE - \MENU)
:mdrbk
locate 11 50
read %!c
upper %!c
let %!x = %!c
find_string %!x \
do_if %!x = 0
locate 11 50
echo \\27[k
goto mdrbk
end_if
locate 15 2
echo Creating LaMenu Main Menu %!b%!c\%!f.BAT
locate 16 2
echo Titled %!a
:re_main
locate 18 27
echonolf Is This Correct (Y,N) ??\\0
read %!i
upper %!i
if %!i = N goto main_menu
if %!i = Y goto cont_main
if not %!i = Y goto re_main
:cont_main
if exist %!f.bat gosub overwrite
if exist %!f.ctl gosub overwrite
if exist %!f.dsp gosub overwrite
gosub display
locate 4 2
echo Creating LaMenu Main Menu %!b%!c\%!f.BAT
echo Titled - %!a
let %!n = %!m
add %!n 1
let %!h = 1
echo %!a >%!f.dsp
echo ECHO OFF >%!f.bat
echo :BEGIN>>%!f.bat
echo LAMENU %!f>>%!f.bat
do_while not %!h = %!n
echo IF \\37LM\\37 == %!h GOTO %!h>>%!f.bat
add %!h 1
end_while
echo IF \\37LM\\37 == F1 GOTO F1>>%!f.bat
echo IF \\37LM\\37 == F2 GOTO F2>>%!f.bat
echo IF \\37LM\\37 == F3 GOTO F3>>%!f.bat
echo IF \\37LM\\37 == F4 GOTO F4>>%!f.bat
echo IF \\37LM\\37 == EX GOTO END>>%!f.bat
let %!h = 1
do_while not %!h = %!n
echo :%!h>>%!f.bat
gosub m_display
locate 4 2
echo Enter The Display Name For Selection %!h ══════\\16
locate 5 2
echo Press Enter To End Setup - Enter * To Skip Selection
:mdlbk
locate 4 50
read %!l
do_if .%!l = .
locate 4 50
echo \\27[k
goto mdlbk
end_if
if .%!l = . goto end_select_m
if %!l = * goto skip_select_m
locate 7 2
echo Enter The DOS Executable Filename ═════════════\\16
:mfnbk
locate 7 50
read %!k
upper %!k
do_if #%!k = #
locate 7 50
echo \\27[k
goto mfnbk
end_if
locate 9 2
echo Enter The Drive Letter (include the colon :) ══\\16
:mdrlbk
locate 9 50
read %!j
upper %!j
let %!x = %!j
find_string %!x :
do_if %!x = 0
locate 9 50
echo \\27[k
goto mdrlbk
end_if
locate 11 2
echo Enter The Directory (include backslashes \) ═══\\16
:mfdrbk
locate 11 50
read %!i
upper %!i
let %!x = %!i
find_string %!x \
do_if %!x = 0
locate 11 50
echo \\27[k
goto mfdrbk
end_if
locate 13 2
echonolf Do You Wish To Exit This Menu Upon Execution (Y,N) ?\\0
read %!g
upper %!g
if %!g = Y let %!g = M
if %!g = M goto next_m
locate 15 2
echonolf Do You Wish A Pause Before Returning To The Menu (Y,N) ?\\0
read %!g
upper %!g
:next_m
echo %!l>>%!f.dsp
gosub pass
if not %!b == %!j echo %!j>>%!f.bat
if not %!c == %!i echo CD %!i>>%!f.bat
echo %!k>>%!f.bat
if %!g = M echo GOTO END>>%!f.bat
if %!g = M goto next_m_1
if %!g = Y echo PAUSE \\62NULL>>%!f.bat
if not %!b == %!j echo %!b>>%!f.bat
if not %!c == %!i echo CD %!c>>%!f.bat
echo GOTO BEGIN>>%!f.bat
:next_m_1
add %!h 1
end_while
goto f_select
:skip_select_m
echo * >>%!f.dsp
echo GOTO BEGIN >>%!f.bat
goto next_m_1
:end_select_m
echo GOTO BEGIN>>%!f.bat
echo \\42>>%!f.dsp
add %!h 1
do_while not %!h = %!n
echo :%!h>>%!f.bat
echo GOTO BEGIN>>%!f.bat
echo \\42>>%!f.dsp
add %!h 1
end_while
:f_select
let %!h = 1
do_while not %!h = 5
echo :F%!h>>%!f.bat
gosub m_display
locate 4 2
echo Enter The Display Name For F%!h (max 14 chrs) ═\\16
locate 5 2
echo Press Enter To End Setup - Enter * To Skip Selection
locate 4 50
read %!l
if .%!l = . goto end_select_f
if %!l = * goto skip_select_f
locate 7 2
echo Enter The DOS Executable Filename ═════════════\\16
:ffnbk
locate 7 50
read %!k
upper %!k
do_if #%!k = #
locate 7 50
echo \\27[k
goto ffnbk
end_if
locate 9 2
echo Enter The Drive Letter (include the colon :) ══\\16
:fdrlbk
locate 9 50
read %!j
upper %!j
let %!x = %!j
find_string %!x :
do_if %!x = 0
locate 9 50
echo \\27[k
goto fdrlbk
end_if
locate 11 2
echo Enter The Directory (include backslashes \) ═══\\16
:fdirbk
locate 11 50
read %!i
upper %!i
let %!x = %!i
find_string %!x \
do_if %!x = 0
locate 11 50
echo \\27[k
goto fdirbk
end_if
locate 13 2
echonolf Do You Wish to Exit After Execution (Y,N) ?\\0
read %!g
upper %!g
if %!g = Y goto f_up
locate 15 2
echonolf Do You Wish To Pause Before Returning To The Menu (Y,N) ?\\0
read %!w
upper %!w
:f_up
echo %!l>>%!f.dsp
if not %!b == %!j echo %!j>>%!f.bat
if not %!c == %!i echo CD %!i>>%!f.bat
echo %!k>>%!f.bat
if %!w = Y echo PAUSE \\62NULL>>%!f.bat
if not %!b == %!j echo %!b>>%!f.bat
if not %!c == %!i echo CD %!c>>%!f.bat
if not %!g = Y echo GOTO BEGIN>>%!f.bat
if %!g = Y echo GOTO END>>%!f.bat
:next_f
add %!h 1
end_while
goto f_end
:skip_select_f
echo * >>%!f.dsp
echo GOTO BEGIN >> %!f.bat
goto next_f
:end_select_f
echo GOTO BEGIN>>%!f.bat
echo \\42>>%!f.dsp
add %!h 1
do_while not %!h = 5
echo :F%!h>>%!f.bat
echo GOTO BEGIN>>%!f.bat
echo \\42>>%!f.dsp
add %!h 1
end_while
:F_END
echo \\26>>%!f.dsp
echo :END>>%!f.bat
echo SET RC=>>%!f.bat
echo SET LM=>>%!f.bat
echo SET SC=>>%!f.bat
echo CLS>>%!f.bat
cls
exit
:overwrite
cls
locate 5 2
beep
echonolf Menu File Already Exists - Overwrite (Y,N) ??\\0
read %!i
upper %!i
if %!i = N goto start
if not %!i = Y goto overwrite
del %!f.bat
del %!f.dsp
del %!f.ctl
return
:end
cls
exit